<!--
  @文件名： logoCom
  @来源：YongPing.Wang|2023/11/19 14:03
  @描述：
-->
<template>
  <div class="logoCom" :class="[isChangeWidth ? (layoutInfoStore.platformMenuOpen ? 'logoComOpen' : 'logoComClose') : 'logoComOpen logoCom2']">
    <img src="@/assets/logo/logo.png" alt="logo" />
  </div>
</template>

<script setup lang="ts">
  import { layoutInfo } from '@/store/layoutInfo.ts'

  defineProps({
    // 宽度是否改变
    isChangeWidth: {
      type: Boolean,
      defalult: true,
    },
  })

  const layoutInfoStore = layoutInfo()
</script>

<style scoped lang="scss">
  .logoCom {
    overflow: hidden;
    line-height: 50px;
    text-align: center;
    img {
      max-height: 40px;
    }
  }
  .logoCom2 {
    text-align: left;
  }

  .logoComOpen {
    width: 220px;
    height: 50px;
    padding: 5px 10px;
    img {
      max-width: 200px;
    }
  }
  .logoComClose {
    width: 50px;
    height: 50px;
    padding: 5px 5px;
    img {
      max-width: 40px;
    }
  }
</style>
